using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// Summary description for StringGenerator
/// </summary>
public class StringGenerator
{
    /// <summary>
    /// Returns a new eight-character random contact number
    /// </summary>
    /// <returns></returns>
    public static string GetContactNumber()
    {
        string s = "";
        Random random = new Random();

        for (int i = 0; i < 8; i++)
        {
            if (random.Next(2) == 0)
                s += Convert.ToChar(random.Next(65, 91));
            else
                s += random.Next(10).ToString();
        }
        return s;
    }
}
